package org.utils
{
	import flash.filters.ColorMatrixFilter;
	
	/**
	 * 滤镜数组
	 * @author anjue
	 */
	public class FiltersUtil
	{
		public static function get grayFilters():ColorMatrixFilter
		{
			var mat:Array =[0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0,0,0,1,0];
			var colorMat:ColorMatrixFilter = new ColorMatrixFilter(mat);
			return colorMat;
		}
		
		/**
		 * 蓝色滤镜
		 * @return 
		 */
		public static function get blueFilters():ColorMatrixFilter
		{
			var mat:Array =[-6.314000129699707,15.729997634887695,1.5840007066726685,0,-634.9999389648438,4.685999870300293,4.729999542236328,1.5839996337890625,0,-635,4.685999393463135,15.730000495910645,-9.415999412536621,0,-635,0,0,0,1,0];
			var colorMat:ColorMatrixFilter = new ColorMatrixFilter(mat);
			return colorMat;
		}
		
		/**
		 * 紫色滤镜
		 * @return 
		 */
		public static function get purpleFilters():ColorMatrixFilter
		{
			var mat:Array =[3.147132158279419,16.976253509521484,-9.123387336730957,0,-634.9999389648438,1.2007551193237305,5.804008483886719,3.9952359199523926,0,-635,11.275338172912598,1.4852299690246582,-1.760568380355835,0,-635,0,0,0,1,0];
			var colorMat:ColorMatrixFilter = new ColorMatrixFilter(mat);
			return colorMat;
		}
		
		/**
		 * 橙色滤镜
		 * @return 
		 */
		public static function get orangeFilters():ColorMatrixFilter
		{
			var mat:Array =[11,0,0,0,-635,0,11,0,0,-635,0,0,11,0,-635,0,0,0,1,0];
			var colorMat:ColorMatrixFilter = new ColorMatrixFilter(mat);
			return colorMat;
		}
		
		/**
		 * 绿色滤镜
		 * @return 
		 */
		public static function get greenFilters():ColorMatrixFilter
		{
			var mat:Array =[-1.4676768779754639,1.4852299690246582,10.982446670532227,0,-635,4.298960208892822,8.837217330932617,-2.1361770629882813,0,-635,-5.775622367858887,16.976253509521484,-0.20063307881355286,0,-634.9998779296875,0,0,0,1,0];
			var colorMat:ColorMatrixFilter = new ColorMatrixFilter(mat);
			return colorMat;
		}
	}
}